﻿using FluentNHibernate.Automapping.Alterations;
using HashFoo.Nhib.Spatial;

namespace MigratorFoo.MockAssembly.Data.Overrides
{
    public class FieldBoundaryOverride : IAutoMappingOverride<Models.FieldBoundary>
    {
        public void Override(FluentNHibernate.Automapping.AutoMapping<Models.FieldBoundary> mapping)
        {
            //mapping.Map(x => x.Boundary)
            //    .CustomType<NHibernate.Spatial.Type.MsSql2008GeometryType>();

            mapping.Map(x => x.Boundary)
                .CustomSqlType("geometry")
                .CustomType<HashFooGeographyType>();
        }
    }
}
